<script language="javascript">
function ConfigureProfitAndLoss()
{
//The following functions are defined in Web Template "Tax Information Request Details - Configuration":
//CreateModal(targetParent, targetButton, modalID, modalTitleText, modalBodyText, modalButtonText)
//AddMessageBelowBooleanRadio(targetBooleanRadio, messageID, response0Text, response1Text)
//RevealElementsOnBooleanResponse1(targetBooleanRadio, elements)
//SetFieldRequired(fieldName, setRequired)
//SetRequiredBasedOnControlField(controlCheckbox, targetField)
var questionLabel = "empty";
//Entertaining
questionLabel = $("#tt_entertaining").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_entertaining", true);
//Question text
$("div.tt_entertaining").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Entertaining/Question'] }}`);
//Info modal
$("div.tt_entertaining").append('<span style="float: right;"> <a href="#" id="tt_entertainingInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_entertaining", "#tt_entertainingInfo", "tt_entertainingInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Entertaining/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_entertaining").after("<br>");
//Response text
AddMessageBelowBooleanRadio("#tt_entertaining", "tt_entertainingResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Entertaining/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Entertaining/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_entertaining", ["#tt_entertainingnotes", "#subgridEntertaining"]);
//Gifts
questionLabel = $("#tt_gifts").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_gifts", true);
//Question text
$("div.tt_gifts").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Gifts/Question'] }}`);
//Info modal
$("div.tt_gifts").append('<span style="float: right;"> <a href="#" id="tt_giftsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_gifts", "#tt_giftsInfo", "tt_giftsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Gifts/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_gifts").after("<br>");
//Response text
AddMessageBelowBooleanRadio("#tt_gifts", "tt_giftsResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Gifts/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/Gifts/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_gifts", ["#tt_giftsnotes", "#subgridGifts"]);
//Legal, professional and consultancy fees
questionLabel = $("#tt_legalprofessionalandconsultancyfees").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_legalprofessionalandconsultancyfees", true);
//Question text
$("div.tt_legalprofessionalandconsultancyfees").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LegalProfessional/Question'] }}`);
//Info modal
$("div.tt_legalprofessionalandconsultancyfees").append('<span style="float: right;"> <a href="#" id="tt_legalprofessionalandconsultancyfeesInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_legalprofessionalandconsultancyfees", "#tt_legalprofessionalandconsultancyfeesInfo", "tt_legalprofessionalandconsultancyfeesInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LegalProfessional/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_legalprofessionalandconsultancyfees").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_legalprofessionalandconsultancyfees", "tt_legalprofessionalandconsultancyfeesResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LegalProfessional/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LegalProfessional/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_legalprofessionalandconsultancyfees", ["#subgridLegalProfessionalAndConsultancyFees"]);
//Charitable donations
questionLabel = $("#tt_charitabledonations").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_charitabledonations", true);
//Question text
$("div.tt_charitabledonations").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CharitableDonations/Question'] }}`);
//Info modal
$("div.tt_charitabledonations").append('<span style="float: right;"> <a href="#" id="tt_charitabledonationsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_charitabledonations", "#tt_charitabledonationsInfo", "tt_charitabledonationsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CharitableDonations/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_charitabledonations").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_charitabledonations", "tt_charitabledonationsResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CharitableDonations/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CharitableDonations/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_charitabledonations", ["#tt_charitabledonationsnotes"]);
showDocumentsforSection("tt_charitabledonations");
//Leased cars
questionLabel = $("#tt_leasedcars").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_leasedcars", true);
//Question text
$("div.tt_leasedcars").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LeasedCars/Question'] }}`);
//Info modal
$("div.tt_leasedcars").append('<span style="float: right;"> <a href="#" id="tt_leasedcarsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_leasedcars", "#tt_leasedcarsInfo", "tt_leasedcarsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LeasedCars/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_leasedcars").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_leasedcars", "tt_leasedcarsResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LeasedCars/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/LeasedCars/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_leasedcars", ["#tt_leasedcarsnotes"]);
showDocumentsforSection("tt_leasedcars");
//Employment related share acquisitions
questionLabel = $("#tt_employmentrelatedshareacquisitions").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_employmentrelatedshareacquisitions", true);
//Question text
$("div.tt_employmentrelatedshareacquisitions").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedShare/Question'] }}`);
//Info modal
$("div.tt_employmentrelatedshareacquisitions").append('<span style="float: right;"> <a href="#" id="tt_employmentrelatedshareacquisitionsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_employmentrelatedshareacquisitions", "#tt_employmentrelatedshareacquisitionsInfo", "tt_employmentrelatedshareacquisitionsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedShare/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_employmentrelatedshareacquisitions").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_employmentrelatedshareacquisitions", "tt_employmentrelatedshareacquisitionsResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedShare/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedShare/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_employmentrelatedshareacquisitions", ["#tt_employmentrelatedshareacquisitionsnotes"]);
showDocumentsforSection("tt_employmentrelatedshareacquisitions");
//Employment related security reporting
questionLabel = $("#tt_employmentrelatedsecurityreporting").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_employmentrelatedsecurityreporting", true);
//Question text
$("div.tt_employmentrelatedsecurityreporting").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedSecurity/Question'] }}`);
//Space above input
$("div.tt_employmentrelatedsecurityreporting").after("<br>");
//Response text
AddMessageBelowBooleanRadio("#tt_employmentrelatedsecurityreporting", "tt_employmentrelatedsecurityreportingResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedSecurity/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/EmploymentRelatedSecurity/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_employmentrelatedsecurityreporting", ["#tt_employmentrelatedsecurityreportingnotes"]);
//Overseas income and withholding tax
questionLabel = $("#tt_overseasincomeandwithholdingtax").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_overseasincomeandwithholdingtax", true);
//Question text
$("div.tt_overseasincomeandwithholdingtax").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/OverseasIncomeAndWithholdingTax/Question'] }}`);
//Info modal
$("div.tt_overseasincomeandwithholdingtax").append('<span style="float: right;"> <a href="#" id="tt_overseasincomeandwithholdingtaxInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_overseasincomeandwithholdingtax", "#tt_overseasincomeandwithholdingtaxInfo", "tt_overseasincomeandwithholdingtaxInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/OverseasIncomeAndWithholdingTax/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_overseasincomeandwithholdingtax").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_overseasincomeandwithholdingtax", "tt_overseasincomeandwithholdingtaxResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/OverseasIncomeAndWithholdingTax/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/OverseasIncomeAndWithholdingTax/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_overseasincomeandwithholdingtax", ["#tt_overseasincomeandwithholdingtaxnotes", "#subgridOverseasIncomeAndWithholdingTax"]);
showDocumentsforSection("tt_overseasincomeandwithholdingtax");
//Cross-border royalties
questionLabel = $("#tt_crossborderroyalties").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_crossborderroyalties", true);
//Question text
$("div.tt_crossborderroyalties").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CrossBorderRoyalties/Question'] }}`);
//Info modal
$("div.tt_crossborderroyalties").append('<span style="float: right;"> <a href="#" id="tt_crossborderroyaltiesInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_crossborderroyalties", "#tt_crossborderroyaltiesInfo", "tt_crossborderroyaltiesInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CrossBorderRoyalties/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_crossborderroyalties").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_crossborderroyalties", "tt_crossborderroyaltiesResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CrossBorderRoyalties/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/CrossBorderRoyalties/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_crossborderroyalties", ["#tt_crossborderroyaltiesnotes", "#subgridCrossBorderRoyalties"]);
showDocumentsforSection("tt_crossborderroyalties");
//Connected party bad debts
questionLabel = $("#tt_connectedpartybaddebts").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_connectedpartybaddebts", true);
//Question text
$("div.tt_connectedpartybaddebts").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/ConnectedPartyBadDebts/Question'] }}`);
//Info modal
$("div.tt_connectedpartybaddebts").append('<span style="float: right;"> <a href="#" id="tt_connectedpartybaddebtsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_connectedpartybaddebts", "#tt_connectedpartybaddebtsInfo", "tt_connectedpartybaddebtsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/ConnectedPartyBadDebts/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_connectedpartybaddebts").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_connectedpartybaddebts", "tt_connectedpartybaddebtsResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/ConnectedPartyBadDebts/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/ConnectedPartyBadDebts/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_connectedpartybaddebts", ["#tt_connectedpartybaddebtsnotes", "#subgridConnectedPartyBadDebts"]);
showDocumentsforSection("tt_connectedpartybaddebts");
//Sundry expenses and other P&L items
questionLabel = $("#tt_sundryexpensesandotherplitems").closest("fieldset").attr("aria-label");
//Set required
SetFieldRequired("tt_sundryexpensesandotherplitems", true);
//Question text
$("div.tt_sundryexpensesandotherplitems").html(`{{ snippets['PracticeGateway/TIR/ProfitAndLoss/SundryExpensesAndOther/Question'] }}`);
//Info modal
$("div.tt_sundryexpensesandotherplitems").append('<span style="float: right;"> <a href="#" id="tt_sundryexpensesandotherplitemsInfo" class="btn btn-info btn-lg"style="padding:5px 5px;font-size:20px;line-height:1;border-radius:10px;"><span class="glyphicon glyphicon-info-sign"></span></a></span>');
CreateModal("div.tt_sundryexpensesandotherplitems", "#tt_sundryexpensesandotherplitemsInfo", "tt_sundryexpensesandotherplitemsInfoModal", questionLabel + " information", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/SundryExpensesAndOther/InfoModal'] }}`, "OK");
//Space above input
$("div.tt_sundryexpensesandotherplitems").after("<br>");
//Label for Documents Subgrid
//Response text
AddMessageBelowBooleanRadio("#tt_sundryexpensesandotherplitems", "tt_sundryexpensesandotherplitemsResponseMessage", `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/SundryExpensesAndOther/Response0Message'] }}`, `{{ snippets['PracticeGateway/TIR/ProfitAndLoss/SundryExpensesAndOther/Response1Message'] }}`);
//Conditional show/hide
RevealElementsOnBooleanResponse1("#tt_sundryexpensesandotherplitems", ["#tt_sundryexpensesandotherplitemsnotes", "#subgridSundryExpensesAndOtherPAndLItems"]);
showDocumentsforSection("tt_sundryexpensesandotherplitems");
}
</script>